<?php

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
#	FILE:			site_specific/regions.php
#	FUNCTION:		Handles the Regions custom page
#	AUTHOR:			Cameron Morrow
#	CREATED:		20/10/2005
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Params
$flash_width = 295;
$flash_height = 430;
$flash_filename = "../site_specific/assets/flash/regionmap.swf";

# Output
addContent("<p>Hover over the map to choose a region.</p>");
addContent("<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ");
addContent("codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" . $flash_width . "\" ");
addContent("height=\"" . $flash_height . "\" id=\"regionmap\">");
addContent("<param name=\"allowScriptAccess\" value=\"sameDomain\" />" .
	"<param name=\"movie\" value=\"" . $flash_filename . "\" />" .
	"<param name=\"quality\" value=\"high\" />" .
	"<param name=\"bgcolor\" value=\"#ffffff\" />" .
	"<embed src=\"" . $flash_filename . "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"" . $flash_width . "\" height=\"" . 
	$flash_height . "\" id=\"regionmap\" name=\"regionmap\" allowScriptAccess=\"sameDomain\" " .
	"type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
addContent("</object></p>");


# Output existing stuff

# Existing content
addContent(parseFlashLinks(preg_replace(array("/<br>/i", "/\n/i", "/\r/i", "/\t/i", "/>\ *</i"), array("<br />", "", "", "", "><"), parseFlashXML($PAGE -> getData("p_content")))));

/*

# Get list of region sub-pages
$regions = $PAGES -> getChildrenOfPage($PAGE_ID);
$regions = $regions -> getPagesArray();

# Region
addContent("<ul>");
foreach ($regions as $region) {
	addContent("<li><a href=\"" . $region -> getID() . ".php\">" . $region -> getData("p_name") . "</a></li>");
}
addContent("</ul>");

*/
?>